home *** CD-ROM | disk | FTP | other *** search
- >I have a network packet driver under DOS which is allowing my computer to
- >communicate with my network card. When WinSock runs under Windows it creates
- >a TCP/IP stack which allows programs to communciate via TCP protocol to the
- >packet driver. Is this all WinSock is doing? or is there a bit more to it?
- >
- >Also can I get a TCP/IP stack to run under DOS? Would this be a replacement
- >for WinSock if I ran the TCP/IP stack under DOS and used some modified
- >version
- >
- >of winpkt.com to allow the virtual machine handling for the DOS stack? Would
- >this allow DOS programs to communicate via TCP/IP if they do not contain
- >heir own stack (NCSA has its own but I want to use something diff.)?
-
- Actually, these are valid and common questions.
-
- The architecture of the stack supporting a WinSock DLL varies between
- different WinSock implementations. You can understand the differences
- if you first get a good picture of the conceptual model, which looks
- like this (the OSI Network Model is the basis of this breakdown, so I
- include it for reference):
-
- WinSock Model OSI Network Model
- OSI layer #
- +-----------------------+ +---------------------------+
- 5-7 | Windows Sockets | | Application, Presentation |
- | Application | | and Session Layers |
- +-----------------------+ +---------------------------+
- WinSock--->+-----------------------+ +---------------------------+
- API | WinSock DLL | | |
- | +---------------+ | |
- | |+-----++-------+ | |
- | || || other | | |
- | || || DLL | | Transport and |
- 3-4 +-------+| |+-------+ | |
- +--------+ +--------+ | Network Layers |
- | Virtual Device | | |
- | Driver (VxD) | | |
- | +-------------+ | |
- | |+------------+ | |
- | || TSR stack | | |
- +---------++------------+ +---------------------------+
- Driver---->+-----------------------+ +---------------------------+
- API | Network Interface | | |
- 2 | Drivers (packet driver| | Data Link Layer |
- | ODI, NDIS, etc | | |
- +-----------------------+ +---------------------------+
- +-----------------------+ +---------------------------+
- 1 | Network Interface Card| | Physical Layer |
- +-----------------------+ +---------------------------+
- |
- +--->network
-
- Here are some of the different architectures illustrated (NOTE: the
- TCP/IP protocol stack provides the equivalent of the OSI network and
- transport layers (layers 3 & 4)):
-
- 1) WinSock DLL has a TCP/IP stack built-in.
- 2) WinSock DLL maps API to another DLL, that has TCP/IP built-in.
- 3) WinSock DLL that maps to VxD that has TCP/IP built-in.
- 4) WinSock DLL that maps to another DLL that uses a VxD that has
- the TCP/IP stack built-in.
- 5) WinSock DLL that maps to another DLL that uses a VxD, that
- multiplexes to a real-mode "Terminate and Stay Resident" (TSR)
- stack.
-
- The architectures numbered 4 and 5 are the only ones that could
- support TCP/IP applications running in a DOS box in Windows. Of
- course, the TCP/IP applications would *NOT* be WinSock applications
- since it wouldn't be possible for them to use the DLL. Only
- model 5 could support applications running in DOS itself (i.e. after
- you *exit* Windows).
-
- You *might* be able to run a DOS application that had a TCP/IP
- stack embedded in it in a DOS box. If you had another TCP/IP
- stack already loaded you'd have to use PKTMUX to allow more than
- one TCP/IP over a single driver. Sounds questionable to me.
-
- I may be wrong, but the assumption I've made is that all the WinSock
- implementations use a Virtual Device Driver (VxD) to interface with
- (and multiplex) the real mode TSR stack or Network Interface driver.
- There could be some doing direct DPMI, or even using an NDIS 3
- protected-mode driver that I don't have illustrated.
-
- I welcome any corrections/improvements to this illustration.
-
- Regards,
- --
- Bob Quinn rcq@ftp.com
- FTP Software, Inc. No. Andover, MA
-
-